FROM ubuntu:16.04

LABEL maintainer="hzy@hzy.org.cn"

ADD	sources.list /etc/apt

WORKDIR	/app

RUN	apt update

RUN	apt install -y git

RUN	git clone https://gitee.com/ctguhzy/nginx.git

RUN	apt install -y build-essential

RUN	apt install -y libpcre3 libpcre3-dev

RUN	apt install -y zlib1g zlib1g-dev

WORKDIR /app/nginx

RUN	./auto/configure

RUN	make

RUN	make install

WORKDIR /app

RUN	rm -rf nginx

EXPOSE	80

CMD	["/usr/local/nginx/sbin/nginx", "-g", "error_log /dev/stdout debug; daemon off;"]

